package cn.stylefeng.guns.modular.mapper;

import cn.stylefeng.guns.modular.entity.Frame;
import cn.stylefeng.guns.modular.entity.Schedule;
import cn.stylefeng.guns.modular.entity.Scheduleitem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.Map;

/**
 * @author third_e
 * @create 2020/1/2 0002-下午 7:31
 */
public interface ShareFrameAndScheduleMapper extends BaseMapper<Object> {

    Page<Map<String, Object>> getShareFrameInfo(@Param("page") Page page,
                                                @Param("otherOrmyself") String otherOrmyself,
                                                @Param("nameOrcontent") String nameOrcontent,
                                                @Param("userId") Long userId);



    Page<Map<String, Object>> getShareScheduleInfo(@Param("page") Page page,
                                                   @Param("otherOrmyself") String otherOrmyself,
                                                   @Param("nameOrcontent") String nameOrcontent,
                                                   @Param("beginTime") String beginTime,
                                                   @Param("endTime") String endTime,
                                                   @Param("userId") Long userId);


    Collection<Frame> getOtherFrameInfo(@Param("userId") Long userId);

    Collection<Schedule> getOtherScheduleInfo(@Param("userId") Long userId);

    Schedule getScheduleAndFrameitem(@Param("scheduleId") Long schedule);

    Collection<Scheduleitem> getShareScheduleitemInfo(@Param("scheduleId") Long scheduleId,
                                                      @Param("startDate") String startDate,
                                                      @Param("endDate") String endDate);
}
